﻿namespace Algorithm
{
    public class Board
    {
        private const int DefaultRows = 500;
        private const int DefaultCols = 500;

        private readonly int[,] matrix;

        public Board(int rows = Board.DefaultRows, int cols = Board.DefaultCols)
        {
            this.Rows = rows;
            this.Cols = cols;
            this.matrix = new int[rows, cols];
        }

        public int Rows { get; private set; }

        public int Cols { get; private set; }

        public int this[Point2D point]
        {
            get
            {
                return this.matrix[point.Row, point.Col];
            }

            set
            {
                this.matrix[point.Row, point.Col] = value;
            }
        }
    }
}